<include file="Public:header" />

<div class="page-content">
    <!-- content starts -->
    <div class="cig-page-header">
        <h1>问题管理</h1>
    </div>
    <div class="row">
        <div class="box col-xs-12">
            <div class="box-inner">
                <div class="cig-box-header clearfix">
                    <div class="col-xs-6 ad-sel">
                        <form method="get" name="search" action="{:U('/Contest/index')}">

                            <div class="col-xs-6 no-padding">
                                <input type="text" value="{$condition}"  name="condition" style="width: 100%">
                            </div>
                            <div class="col-xs-4">
                                <button type="submit" class="rq-btn btn-gray btn-heith-lg">查询</button>
                            </div>
                        </form>
                    </div>
                    <div class="col-xs-6 button-con">
                        <div class="cig-txt-right"> <a href="{:U('/Contest/add')}" class="btn btn-success cig-btn-lg"><i class="fa fa-hand-o-right"></i>添加竞赛&作业</a> </div>
                    </div>
                </div>
                <div class="box-content">
                    <div class="row">
                        <div class="col-xs-12">
                        </div>
                        <div class="col-xs-12">
                            <table id="sample-table-2" class="table table-striped table-bordered table-hover dataTable" aria-describedby="sample-table-2_info">
                                <thead>
                                <tr role="row">
                                    <th>ContestID</th>
                                    <th>Title</th>
                                    <th>StartTime</th>
                                    <th>EndTime</th>
                                    <th>Private</th>
                                    <th>Status</th>
                                    <th>operate</th>
                                </tr>
                                </thead>
                                <tbody>
                                <foreach name="list" key="k" item="val">
                                    <tr>
                                        <td class="">{$val.contest_id}</td>
                                        <td>{$val.title}</td>
                                        <td class="">{$val.start_time}</td>
                                        <td class="">{$val.end_time}</td>
                                        <td class="">
                                            <if condition="$val['private'] eq 0">
                                                Public->Private
                                                <else />
                                                Private->Public
                                            </if>
                                        </td>
                                        <td class="">
                                            <if condition="$val['defunct'] eq N">
                                                Available
                                                <else />
                                                Reserved
                                            </if>
                                        </td>
                                        <td>
                                            <span class="action-buttons">
                                                <a href="{:U('/Contest/edit',array('cid'=>$val[contest_id]))}" class="green" title="Edit"> <i class="ace-icon fa fa-pencil bigger-110"></i> </a>
                                                <a id="" class="dark" href="{:U('/Contest/copy',array('cid'=>$val[contest_id]))}" title="Copy"> <i class="ace-icon fa fa-paste bigger-110"></i> </a>
                                                <a id="" class="dark" href="{:U('/Contest/export',array('pid'=>$val[contest_id]))}" title="Export"> <i class="ace-icon fa fa-download bigger-110"></i> </a>
                                                <a id="" class="dark" href="{:U('/Contest/logs',array('pid'=>$val[contest_id]))}" title="Logs"> <i class="ace-icon fa fa-file bigger-110"></i> </a>
                                            </span>
                                        </td>

                                    </tr>
                                </foreach>
                                <tr >
                                    <td colspan="7">{$page->show()}</td>
                                </tr>
                                </tbody>
                            </table>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>

    <!--/row-->

</div>
<!--content-->
<div> </div>
<include file="Public:footer" />
